home *** CD-ROM | disk | FTP | other *** search
/ CD Practico: Seleccion De Shareware / CD Practico: Seleccion de Shareware.iso / SOFCAS / UTIL / ACCESO2M.ZIP / ACCESO2M.ENG next >
Text File  |  1997-01-01  |  10KB  |  237 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.          =============================================================
  10.                                     ACCESO 2M
  11.          =============================================================
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.          -------------------------------------------------------------
  21.                                      Index                            
  22.          -------------------------------------------------------------
  23.           
  24.          0. Warranty limit
  25.           
  26.          1. Registered trademarks
  27.           
  28.          2. Introduction
  29.           
  30.          3. Requirements
  31.           
  32.          4. Use of ACCESO 2M
  33.           
  34.          5. Frequently asked questions
  35.           
  36.          6. Final words
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.          -------------------------------------------------------------
  46.          0. Warranty limit
  47.          -------------------------------------------------------------
  48.           
  49.               ACCESO 2M   has   been   tested   successfully  in  some
  50.          computers, but it's impossible to guarantee that it will work
  51.          fine in other computers with different configurations. Use at
  52.          your own risk.
  53.           
  54.               ACCESO 2M is freeware and  someone  can  use and copy it
  55.          provided that the  executable  keeps  its original  form  and
  56.          provided that executable  and  documentation  files  will  be
  57.          distributed together.
  58.  
  59.  
  60.  
  61.  
  62.          -------------------------------------------------------------
  63.          1. Registered                                      trademarks
  64.          -------------------------------------------------------------
  65.           
  66.               MS-DOS, WINDOWS and WINDOWS95 are registered  trademarks
  67.          of Microsoft Corporation
  68.           
  69.               DELPHI is a registered trademark of Borland Inc.
  70.  
  71.  
  72.  
  73.  
  74.          -------------------------------------------------------------
  75.          2. Introduction
  76.          -------------------------------------------------------------
  77.           
  78.               You can use ACCESO 2M to extract files from 2M formatted
  79.          disks without leaving Windows95.
  80.  
  81.  
  82.  
  83.  
  84.          -------------------------------------------------------------
  85.          3. Requirements
  86.          -------------------------------------------------------------
  87.           
  88.               This program  has  been   created  for  using  it  under
  89.          Windows95, but the  compiler used generates standard  Windows
  90.          executables, so you  can  use  ACCESO  2M with Windows 3.1 or
  91.          3.11 although it is ridiculous  because  2M  works  perfectly
  92.          with them. ACCESO  2M  requires  300Kb  of  free  memory  for
  93.          loading it, 64Kb  of  conventional  memory  for  intermediate
  94.          transfer buffer and  15%  of  involved  disk's  capacity  for
  95.          caching.
  96.           
  97.               It's needed  2M loaded before enter Windows95  and  been
  98.          using interrupt 40h.  Supported  versions  of  2M are 2.1 and
  99.          3.0; These versions use interrupt  40  if  2M determines that
  100.          diskette access are  made  thought  this interrupt.  If  this
  101.          weren't possible then  try  loading diskette relative drivers
  102.          or programs in a different order.
  103.           
  104.               ACCESO 2M only works with 512 bytes per sector diskettes
  105.          (512 bytes per sector logical  not  necessary physical) and 1
  106.          sector per cluster;   all  2MF  formatted  disks   use   this
  107.          parameters.
  108.  
  109.  
  110.  
  111.  
  112.          -------------------------------------------------------------
  113.          4. Use of ACCESO 2M
  114.          -------------------------------------------------------------
  115.           
  116.               Use of ACCESO 2M is trivial and quite simple. It must be
  117.          said that no multiple file choice can be made  and  that  the
  118.          diskette could be unreadable if it presents some error in the
  119.          system's zones (FAT, root directory) or in the subdirectory's
  120.          one.
  121.  
  122.  
  123.  
  124.  
  125.          -------------------------------------------------------------
  126.          5. Frequently asked questions
  127.          -------------------------------------------------------------
  128.           
  129.               * Why is ACCESO 2M so long?
  130.               * What language did you use?
  131.           
  132.               - Because it has been programmed using a visual language
  133.          and everybody knows  how nice and simple is programming  with
  134.          them and how  big  the executables are. For example, the code
  135.          and data associated with file  control  alone  is  50Kb long.
  136.          Programming without visual control's help it  would  be small
  137.          but also much more difficult job.
  138.           
  139.               - ACCESO  2M  has been coded using Delphi with one small
  140.          assembler fragment.
  141.           
  142.               * Why ACCESO 2M can't write on the disks?
  143.               * Will someday exist a version with this feature?
  144.           
  145.               - Simply because disk access is made at sector level and
  146.          is quite boring seeking the FAT  to  obtain  the sectors of a
  147.          file.  Writing will be more tedious and the goal  was  coding
  148.          to get out  of  a  jam  not  reprogramming MS-DOS file access
  149.          subroutines.
  150.           
  151.               - Surely there will never  exist a version that permited
  152.          writing 2M disks.
  153.           
  154.               * What's the trick?
  155.               * How does ACCESO 2M work?
  156.               * How does ACCESO 2M interact with 2M?
  157.           
  158.               - Well,  the trick is quite simple.  Windows95  use  its
  159.          protected mode drivers for diskette access bypassing BIOS and
  160.          MS-DOS resident programs  in  the  background, although these
  161.          programs continue in   the  conventional   memory   and   are
  162.          completely accessible for calling without interrupts.
  163.           
  164.               This is the trick, using DPMI's function  "Simulate Real
  165.          Mode Call Far  With  Iret  Frame"  (Int  31h  AX=0302h)  with
  166.          interrupt 40h address  and  with   an   appropiate   register
  167.          structure with the transfer address of the disk  data to read
  168.          in conventional memory  in  a buffer we have allocated before
  169.          with GlobalDOSAlloc Windows function  . After transfer we can
  170.          copy out the  contents of the buffer to some memory  directly
  171.          accessible by our   program.   This  is,  it's  like  calling
  172.          interrupt 40h in real or virtual86  mode  with  the  pair  of
  173.          instructions pushf/call far,  and, by the way, this mechanist
  174.          can be used  in  a MS-DOS window  with  a  program  that  use
  175.          interrupt 13h, that will be the interrupt 2M will use in this
  176.          conditions.
  177.           
  178.               * Why not using interrupt 13h instead of 40h?
  179.           
  180.               - Because  Windows95  at loading changes  interrupt  40h
  181.          vector pointing it  to  an instruction like "arpl ..." trying
  182.          to prevent programs calling interrupt  13h  using  pushf/call
  183.          far. The execution  of  arpl  in  virtual86 mode  produce  an
  184.          exception caught by  Windows95  that continue the disk access
  185.          through its protected  mode  drivers   and   doesn't  reflect
  186.          interrupt 13h or 40h to virtual86 mode. Calling interrupt 13h
  187.          with this process the result will be the same that if we used
  188.          normal diskette access.
  189.           
  190.               * How do you determine 2M presence?
  191.           
  192.               - I  use the same trick described for calling  interrupt
  193.          40h but with  2Fh  and  I  look  at conventional memory using
  194.          selectors obtained through  DPMI's   function   "Segment   to
  195.          Selector" (Int 31h  AX=0002h),  if  any  CiriSOFT   complaint
  196.          program answers the   request.   By  the  way,  Windows  DPMI
  197.          Delphi's documentation discourages  the  use of these sort of
  198.          functions but I  didn't  find  other way to obtain  selectors
  199.          pointing to conventional  memory and this method works and it
  200.          doesn't produce any disturb (At least I didn't find).
  201.           
  202.               * Can I obtain the source code anywhere?
  203.           
  204.               - No, you can't. Except 2M's  access  trick  the rest of
  205.          the code is  conventional  programming with nothing  special,
  206.          it's uncommented and without learning purposes.
  207.           
  208.               * What's the cache?
  209.           
  210.               - ACCESO  2M  tries reading the diskette by whole tracks
  211.          for speeding the reading process  (I  consider  a  track  the
  212.          portion of a cylinder that is over a head, that  is, a 1440Kb
  213.          diskette has 80  cylinders and 160 tracks). A track organised
  214.          cache is used to keep last recently  read  tracks  and with a
  215.          size of 15%  of  the  whole disk capacity that  supplies  the
  216.          requested sector for reading functions.
  217.           
  218.               If requested  track  is  wrong  it  tries  to  read  the
  219.          involved sector alone, if this  one weren't possible an error
  220.          is reported and  the running task is finished.  This  is  the
  221.          reason because it's  impossible reading a diskette with a bad
  222.          sector in the subdirectory area because we always to read the
  223.          whole directory tree.
  224.  
  225.  
  226.  
  227.  
  228.          -------------------------------------------------------------
  229.          6. Final words
  230.          -------------------------------------------------------------
  231.           
  232.               + This program is specially  dedicated to Ciriaco García
  233.          de Celis, 2M author.
  234.           
  235.               + My english isn't quite good, sorry.
  236.  
  237.